package com.spaceobj.chess.entity;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;

@Data
@TableName("user")
public class User {
    @TableId(type = IdType.AUTO)
    private Integer userId;
    @TableField("nickname")
    private String nickname;
    @TableField("username")
    private String username;
    @TableField("avatar")
    private String avatar;
    @TableField("rating")
    private Integer rating;
    @TableField("win_count")
    private Integer win_count;
    @TableField("lose_count")
    private Integer lose_count;
    @TableField("draw_count")
    private Integer draw_count;
    @TableField("current_game_id")
    private Integer current_game_id;
    @TableField("status")
    private Enum status;

    @TableField("password")
    private String password;
    @TableField("email")
    private String email;

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("last_login")
    private LocalDateTime lastLogin;

    @TableLogic
    @TableField("deleted")
    private Integer deleted;
} 